import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
import { PaymentService } from './index.service';
import { JwtAuthGuard } from '@/authGuard/jwtAuthGuard';

@Controller()
export class PaymentController {
  constructor(private readonly paymentService: PaymentService) {}
  @UseGuards(JwtAuthGuard)
  @Post('alipay/pay')
  pay(@Body() params) {
    return this.paymentService.pay(params);
  }

  @Post('alipay/payCallback')
  payCallback(@Body() params) {
    return this.paymentService.payCallback(params);
  }

  @UseGuards(JwtAuthGuard)
  @Post('/checkVipInfo')
  checkVipInfo() {
    return this.paymentService.getVipInfo();
  }

  @Get('/getVipTypes')
  getVipTypes() {
    return this.paymentService.getVipTypes();
  }
}
